The MacWebCam WebStar Plug-in

System Requirements:

Quick (first-time) Setup

Create a folder called "webcam" in your HTTP Server root html documents folder.

  1. Remove older MacWebCam plug-ins
  2. Launch MacWebCam 2.7
  3. Create a new document by selecting "New" in the File menu.
  4. Select Preview Window. You should see a video image.
  5. Save your webcam document as "mydoc" (in your startup items folder, if you like)
  6. Go to Finder. Put the file "mwc_unavailable.jpg" in your HTTP server's root directory. That file will be used if the plug-in cannot return a live video image. You can change it later to suit your needs.
  7. Put "MacWebCamPlug" in your HTTP server's Plug-ins folder.
  8. Restart your HTTP Server.

Streaming Live Images

Add the following to your .html files to grab a live image:

<IMG SRC="mydoc.mwc" HEIGHT=160 WIDTH=320>

The format of the plug-in syntax is as follows:

mydoc.mwc instructs the server to invoke the MacWebCam plug-in. The MacWebCam plug-in removes the suffix .mwc and uses the rest of the name as the document name, in the above example, the plug-in will work with the open MacWebCam document saved as "mydoc". If MacWebCam does not have an open document with the name specified in the plug-in command, no images will be returned.

Set the HEIGHT and WIDTH to the final image size, which is displayed in MacWebCam's status window under image size.

If you're upgrading from an earlier version:

Make sure change the way documents are specified. Older versions did not require a document name -- and the document name was specified by the word "doc" or "document." The plug-in now filters out browsers that are not: Netscape, or Macintosh Microsoft Internet Explorer. (When a new version of MSIE for Windows supports streaming images, a new plug-in will be available on my site at www.rearden.com.

Specifying the number of images- The "images" argument

<IMG SRC="mydoc.mwc?images=1" HEIGHT=160 WIDTH=320><BR> Here is one image<BR>

Sending Image Files- The "file" argument

The MacWebCam plug-in can be used to serve image files that have been saved (periodically) by MacWebCam. If you use the plug-in to serve image files, you do not need to flush the WebStar cache. You can also access image (JPEG, GIF and movie) files from anywhere that your document saves them-- including from a ram disk.

<IMG SRC="mydoc.mwc?file=mydoc01.jpg" HEIGHT=160 WIDTH=320>

In this example, you are accessing the MacWebCam document "mydoc". You are getting the file called mydoc01.jpg. Remember that the number of leading zeros in a file name changes with the maximum number of files to save. Again, use the actual HEIGHT and WIDTH of the final image (from the status window) in your image reference.

Filtering Browsers - The "filter" argument

The plug-in now supports automatic filtering of browsers that are not known to support streaming server-push. If you do not want this server filtering done, add a filter=0. As in: <IMG SRC="mydoc.mwc?filter=0" > Filtering only takes place when the number of images is > 1.